package com.wanmait.recycle.listener;

import java.util.List;

import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.annotation.WebListener;

import org.springframework.web.context.support.WebApplicationContextUtils;

import com.wanmait.recycle.pojo.Province;
import com.wanmait.recycle.service.ProvinceService;

//@WebListener
public class ContextListener implements ServletContextListener {

	//项目停止时自动执行
	
	public void contextDestroyed(ServletContextEvent e) {
		

	}

	//在项目启动时自动调用
	
	public void contextInitialized(ServletContextEvent e) {
		ServletContext application = e.getServletContext();
		application.setAttribute("onlineCount", 0);
		
	}

}










